package com.jinglin.common;

import com.jinglin.exception.ProjectException;
import com.jinglin.utils.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ProjectExceptionHandler {
    @ExceptionHandler(ProjectException.class)
    public Result doException(ProjectException e){
        return Result.fail(e.getMessage());
    }
}
